package eleTrain.training5;

import neuralNetworks.NeuralNetwork;
import neuroPoker.training.BlockingThreadPool1;
import neuroPoker4.netze.tool.AllNetLoader;

public class PLKITrainerMCORE extends PLKITrainer {

	public BlockingThreadPool1 bpool = new BlockingThreadPool1(8);

	public PLKITrainerMCORE(AllNetLoader allLoad, int anzSpieler, String path,
			int saveAll, int plkiNegAnteil) {
		super(allLoad, anzSpieler, path, saveAll, plkiNegAnteil);
	}

	// netz trainieren und fehler des netzes berechnen
	protected void trainNet(final int netNr, final NeuralNetwork nnet,
			final double[] ip, final double dop) {
		bpool.add(new Runnable() {
			@Override
			public void run() {
				double err = dop - nnet.train(ip, dop);
				statistik.statistik(netNr, nnet, err);
			}
		});
	}

}
